package oceanlife.log;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

import oceanlife.OLSet;

public class Logger {
	public static FileWriter fstream;
	public static PrintWriter out;
	public static boolean initialized = init();
	
	public static boolean init(){
		try {
			fstream = new FileWriter("linux/logs/log"+OLSet.get("testSet")+".txt",true);
			out = new PrintWriter(fstream,true);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return true;
	}
	
	public static void write(String str){
		System.out.println(str);
		out.println(str);

	}
	
	public static void main(String[] args){
		try {
			FileWriter fstream = new FileWriter("log.txt",true);
			PrintWriter out = new PrintWriter(fstream,true);
			out.println("Best Child: ");
		} catch (IOException e) {
			e.printStackTrace();
		}


	}
}
